var path = require('path')

function resolve (dir) {
  return path.join(__dirname, dir)
}

const defaultConfig = {
  publicPath: './',
  chainWebpack: (config) => {
    config.resolve.alias
      .set('@config', resolve('./config'))
      .set('@yuto/x-spreadsheet', resolve('../x-spreadsheet/src'))
  },
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          javascriptEnabled: true,
          modifyVars: {
            'border-radius-base': '4px',
            'menu-dark-bg': '#1e222d',
            'layout-header-background': '#262f3e'
          }
        }
      }
    }
  }
}

module.exports = defaultConfig
